<!--
 * @FilePath     : /study_code/vue2.x/createElement2 copy.html
 * @Description  : 第 1 参数为 组件选项对象
 * @Date         : 2025-05-03 10:11:25
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-05-03 10:11:29
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <div id="app"></div>

    <script src="/vue/dist/vue.min.js"></script>
    <script src="./common.js"></script>
    <script>
      // 子组件
      const myComponent = {
        data: function () {
          return {
            count: 99,
          }
        },
        props: [],
        created() {
          console.log(this)
        },
        template: `<div>组件选项对象，这里夹着 {{count}} 数据</div>`,
        methods: {},
      }

      var app = new Vue({
        el: '#app',
        data: function () {
          return {
            blogTitle: 'This is ba blogTitle',
          }
        },
        render: function (createElement) {
          return createElement(
            myComponent // 这里渲染组件选项对象
          )
        },
      })
    </script>
  </body>
</html>
